package com.pingan.agentbank.aaos.task;

import com.pingan.agentbank.aaos.pojo.Config;
import com.pingan.agentbank.aaos.service.BusinessService;
import com.pingan.agentbank.aaos.util.LineHandler;
import com.pingan.vframe.db.DBName;
import com.pingan.vframe.db.DBTask;
import com.pingan.vframe.lang.Inject;
import com.pingan.vframe.logging.Log;
import com.pingan.vframe.logging.LogFactory;

@DBName("defaultdb")
public class BusinessTask extends DBTask{

    private final Log log = LogFactory.getLog();

    @Inject
    BusinessService businessService;

    private Config config;
    private LineHandler lineHandler;

    public Config getConfig() {
        return config;
    }

    public void setConfig(Config config) {
        this.config = config;
    }





    @Override
    protected void execute() throws InterruptedException {

        //中断续传
        businessService.resume(config);
        //开始执行新任务
        businessService.perform(config);
    }


}
